package chapter6.section3;

import chapter6.section1.Account;

//程序6-2：比较两个变量是否引用了同一个对象
public class Test {
	public static void main(String[] args) {
		Account a1=new Account("001","鲁宁",1000);
		Account a2=new Account("001","鲁宁",1000);
		boolean result=(a1==a2);
		System.out.println("a1==a2 is "+result);
		result=a1.equals(a2);
		System.out.println("a1.equals(a2)="+result);
	}
}
 